nice_things/storage/process_runtime_dir.sh
readonly:process_runtime_dir
Since 0.3.0 · Source
import "{ readonly:process_runtime_dir }" from nice_things/storage/process_runtime_dir.sh
Synopsis"${process_runtime_dir}"
Configuration
–
Description
The runtime directory for the current process. Will use the value of the program_runtime_dir variable, appending /nice_things/process_runtime_dir/$$, with the PID of the current process as last pathname component. The directory is created on initialization.
A cleanup function is registered with destructor_add on initialization to delete this directory when the program exits.
Normally, this variable should not be used directly by user code. To create runtime files, use the create_runtime_file function instead.
Options
–
Operands
–
Stdin
–
Stdout
–
Stderrlog_error.
Exit status
0: Successful definition.13: Failed to create directory (on initialization) (abort).
Abort
Aborts if initialization fails.
Usage examples
# Print all runtime files created by the process
ls -A "$process_runtime_dir"